require 'crawler/crawler'

module Crawler
  
  class BloggerCrawler < Crawler
    
    public
    
    def initialize(args = {})   
      super args
    end
    
    def crawl(c)
      request_uri = "http://www.blogger.com/profile/#{c.blogger_userid}"
      @curl.url = request_uri
      @curl.http_get
      c.status = @curl.response_code
      c.body = @curl.body_str
      @curl.response_code == 200
    end
    
    
    def update_urls
      raise NotImplementedError.new "This method is not necessary. The update_url_conditios feature is provide during Crawler::BlogspotCrawler#start_crawling"
    end
    
    def update_url_conditios 
      raise NotImplementedError.new "This method is not necessary. Then method Crawler::BloggerCrawler#update_urls is not implemented"
    end
    
    def crawl_table
      BloggerCrawl
    end
    
    protected
    
    def has_crawl? s
      raise NotImplementedError.new "This method is not necessary. Then method Crawler::BloggerCrawler#update_urls is not implemented"
    end
    
  end
  
end